// -*- IDL -*-
/**
 * @file GIOP.pidl
 *
 * @brief Pre-compiled IDL source for the GIOP module.
 */

#ifndef TAO_GIOP_PIDL
#define TAO_GIOP_PIDL

#include "tao/IOP.pidl"

#pragma prefix "omg.org"

module GIOP
{
  typedef short AddressingDisposition;
  const short KeyAddr = 0;
  const short ProfileAddr = 1;
  const short ReferenceAddr = 2;

  struct Version
  {
    octet major;
    octet minor;
  };

  struct IORAddressingInfo
  {
    unsigned long selected_profile_index;
    IOP::IOR ior;
  };

  union TargetAddress switch (AddressingDisposition)
  {
    case KeyAddr: CORBA::OctetSeq object_key;
    case ProfileAddr: IOP::TaggedProfile profile;
    case ReferenceAddr: IORAddressingInfo ior;
  };

  enum MsgType {
    Request,
    Reply,
    CancelRequest,
    LocateRequest,
    LocateReply,
    CloseConnection,
    MessageError,
    Fragment
  };

  enum ReplyStatusType {
    NO_EXCEPTION,
    USER_EXCEPTION,
    SYSTEM_EXCEPTION,
    LOCATION_FORWARD,
    LOCATION_FORWARD_PERM,
    NEEDS_ADDRESSING_MODE
  };

  enum LocateStatusType {
    UNKNOWN_OBJECT,
    OBJECT_HERE,
    OBJECT_FORWARD,
    OBJECT_FORWARD_PERM,
    LOC_SYSTEM_EXCEPTION,
    LOC_NEEDS_ADDRESSING_MODE
  };
};

#endif  /* TAO_GIOP_PIDL */
